Fades whatever is currently audible out, then fades m in - one Direct Sound channel, so this is always sequential, never a true overlap.
music_fade_to(m, loop, volume)| Name | Type |
|---|---|
m | song |
loop | bool |
volume | real |
Nothing.
Fades whatever is currently audible out, then fades m in - there is only one Direct Sound channel, so this is always sequential (fade out, then fade in), never a true overlap of two songs. A no-op if m is already playing, or already the target of an in-progress fade, at the same volume - re-requesting the same song (two rooms that happen to share one, say) changes nothing, which is exactly what makes moving between such rooms transparent instead of restarting the song on every crossing. Asking for the same song at a different volume keeps the song going and moves its volume to the new one (up with the fade-in, down at once).
music_fade_to(song_doc_theme, true, 1);Crossfades to the theme, looping, at full volume - the usual call for a room's own song setting, made once from that room's creation code.
A complete no-op if m is already playing or already the target of an in-progress fade - re-requesting the same song (e.g. two rooms sharing one) changes nothing, so leaving one room for another mapped to the same song is transparent. `music_fade_to(nothing, ...)` fades out to silence (no song to fade in to).